home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.jan.archive / 000073_crash!vaxca1.unica.it!CASANOVA_Thu, 27 Jan 94 00:53:38 PST.msg < prev    next >
Text File  |  1994-02-17  |  4KB  |  98 lines

  1. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  2.       id <1o20@bkhouse.cts.com>; Thu, 27 Jan 94 00:53:38 PST
  3. Received: from VAXCA1.UNICA.IT by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0pPE3u-0000JnC; Wed, 26 Jan 94 09:29 PST
  5. Date:    Wed, 26 Jan 1994 18:31:54 +0200 (CET)
  6. Message-Id: <940126183154.17da@vaxca1.unica.it>
  7. X-Vmsmail-To: SMTP%"AmigaE@bkhouse.cts.com"
  8. From: CASANOVA@vaxca1.unica.it
  9. To: AmigaE@bkhouse.cts.com
  10. Subject: Unsubscribe
  11.  
  12. Please remove me from this mail list . Thanks
  13. From crash!utu.fi!knikulai Thu, 27 Jan 94 02:04:46 PST
  14. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  15.       id <1o4m@bkhouse.cts.com>; Thu, 27 Jan 94 02:04:46 PST
  16. Received: from castor.cc.utu.fi by crash.cts.com with smtp
  17.     (Smail3.1.28.1 #18) id m0pPJe8-0000mQC; Wed, 26 Jan 94 15:27 PST
  18. Received: from polaris.cc.utu.fi by utu.fi id <166757-3>; Thu, 27 Jan 1994 01:27:26 +0200
  19. Date:    Thu, 27 Jan 1994 01:27:07 +0200
  20. In-Reply-To: <MAILQUEUE-101.940125162133.256@rcbins.mu.wvnet.edu>
  21. Message-ID: <Pine.3.89.9401270122.A13157-0100000@polaris.cc.utu.fi>
  22. MIME-Version: 1.0
  23. Content-Type: TEXT/PLAIN; charset=US-ASCII
  24. From: Kai Juhana Nikulainen <knikulai@utu.fi>
  25. To: The AmigaE Mailing List <AmigaE@bkhouse.cts.com>
  26. Subject: Re: fonts
  27.  
  28.  
  29. On Tue, 25 Jan 1994, R. Alan Monroe wrote:
  30.  
  31. > How do you print in other fonts in an intuition window???
  32. > I used OpenDiskFont to get 'times 18' from disk,
  33. > then SetFont(stdrast,mywin) but it prints blank...
  34. > And yes I do have the foreground color (APen) set to something
  35. > visible.
  36.  
  37. This is a small program I've posted before, here it goes again...
  38.  
  39. MODULE 'diskfont'             /* OpenDiskFont is here */
  40. MODULE 'graphics/text'        /* textattr structure is here */
  41. MODULE 'intuition/intuition'  /* window structure is here */
  42.  
  43. PROC do_it(rport)
  44. DEF f,ta:PTR TO textattr
  45.   ta:=New(SIZEOF textattr)
  46.   ta.name:='Ruby.font'  
  47.   ta.ysize:=15           /* point size */
  48.   ta.style:=FS_NORMAL    /* no underlines etc. */
  49.   ta.flags:=FPF_DISKFONT 
  50.   f:=OpenDiskFont(ta)
  51.   IF f
  52.     SetTopaz(8)                  /* Use topaz 8 for first line */
  53.     TextF(20,20,'FontDemo by Kai.Nikulainen@utu.fi')
  54.     SetFont(rport,f)          /* change the window's font */
  55.     TextF(70,80,'This is Ruby 15')
  56.     Move(rport,80,150)                 /* an altenative way to print text which */
  57.     Text(rport,'Hit ^C to quit',14)    /* does not use stdrast */
  58.     CloseFont(f)             /* fonts must be closed after use */
  59.     SetTopaz(8)              /* set font back to standard */
  60.   ELSE
  61.     WriteF('Can not open font\n')
  62.   ENDIF
  63. ENDPROC
  64.  
  65.  
  66. PROC main()
  67. DEF s,w:PTR TO window
  68.   s:=OpenS(320,200,2,0,'')
  69.   IF s
  70.     w:=OpenW(0,0,320,200,0,0,'',s,15,0)
  71.     IF w
  72.       diskfontbase:=OpenLibrary('diskfont.library',0)
  73.       IF diskfontbase
  74.         do_it(w.rport)
  75.         WHILE CtrlC()=FALSE  /* wait for ctrl-c, which does NOT register */
  76.         ENDWHILE         /* if the program window is activated */
  77.       ELSE /* no diskfont.library found */
  78.         WriteF('Can not open diskfont.library\n')
  79.       ENDIF /* diskfontbase */
  80.       CloseW(w)
  81.     ELSE /* window did not open */
  82.       WriteF('Can not open window\n')  
  83.     ENDIF /* w */
  84.     CloseS(s)
  85.   ELSE /* screen did not open */
  86.     WriteF('Can not open screen\n')
  87.   ENDIF /* s */
  88. ENDPROC
  89.  
  90. > Alan 
  91.  
  92.    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  93.    |   Kai.Nikulainen@utu.fi, Computer Science,    |
  94.    |   University of Turku, Phone:+358 21 2335407  |
  95.    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*